<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>视频</title>
    <style>
        video{
            width: 1500px;
            height: 800px;
            margin-left: 200px;

        }
        button{
            display: inline-block;
            outline: none;
            cursor: pointer;
            text-align: center;
        }
    </style>
</head>
<body>
        <video  id="vid" src="videos/movie.mp4" controls loop></video>
    <br>
    <button id="playPause" onclick="playPause()">播放</button>
</body>

    <script>
        var myVideo=document.getElementById("myVideo")

        function playPause(){
            var myButton=document.getElementById("playPause")
            if (myvideo.Paused){
                myvideo.play();
                myButton.innerHTML="暂停"
            }
            else{
                myVideo.pause();
                myButton.innerHTML="播放"
        }
    }
    </script>
</html>